1 using UnityEngine;
2 using
System.Collections;
3
4 public
class DemoBoxesGui : MonoBehaviour
5 {
6     
public bool HideUI = false;
7
8     
void OnGUI()
9     {
10         
if (HideUI)
11         {
12             
return;
13         }
14
15         GUILayout.Label(PhotonNetwork.connectionStateDetailed.ToString());
16
17         
if (!PhotonNetwork.connected)
18         {
19             
if (GUILayout.Button("Connect"))
20             {
21                 PhotonNetwork.ConnectUsingSettings(
null);
22             }
23         }
24         
else
25         {
26             
if (GUILayout.Button("Disconnect"))
27             {
28                 PhotonNetwork.Disconnect();
29             }
30         }
31
32     }
33
34 }



Trò chơi Tic-Tac-Toe, game đánh caro full source code 53.532 lượt xem

Gõ tìm kiếm nhanh...